package com.cll.learn.control.demo03;

import java.util.concurrent.CyclicBarrier;

/**
 * 描述信息:
 *
 * @author CLL
 * @version 1.0
 * @date 2021/5/15 17:42
 */
public class CyclicBarrierTest {

    public static void main(String[] args) {
        CyclicBarrier cyclicBarrier = new CyclicBarrier(10, new CyclicBarrierActionThread());
        System.out.println("开始考试");
        for (int i = 0; i < 10; i++) {
            new Thread(new StudentThread("学生" + i, cyclicBarrier)).start();
        }
    }
}
